<?php 
header('Content-type: text/html');
header('Content-type: application/rss+xml');
echo '<?xml version="1.0" encoding="utf-8"?>' . "
";
?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
		<title>Epicentr - Whats Going On</title>
	    <link><?php echo site_url(); ?></link>
	    <description>Whats Going on at Epicentr</description>
	    <dc:language>en-gb</dc:language>
	    <dc:creator></dc:creator>

	    <dc:rights>Copyright <?php echo gmdate("Y", time()); ?></dc:rights>
	    <admin:generatorAgent rdf:resource="http://www.getepicentr.net" />
	
		<?php if ($updates):?>

	    <?php foreach($updates as $key => $update): ?>
	    

	     <item>
			<title><?php if ($update->activity_title):?><?=$update->activity_title;?> in <?php endif;?> <?php if ($update->centertitle):?><?=$update->centertitle;?> on <?php endif;?> <?=$update->job_title;?> for <?=$update->company_name;?></title>
			<link><?=site_url('jobs/showUpdates/'.$update->jobid);?></link>
			<description><![CDATA[
				<p>Date: <?php echo date ('d/m/Y', strtotime($update->dateapplicable));?></p>
				<?=nl2br($update->notes);?>
				<p>by <?=$update->firstname;?> <?=$update->lastname;?></p>
			]]></description>
			<pubDate><?php echo date ('r', strtotime($update->datecreated));?></pubDate>
			<guid isPermaLink="true"><?=site_url('jobs/showUpdates/'.$update->jobid.'#timesheet-'.$update->id);?></guid>
	    </item>
	    
	    
	    <?php endforeach; ?>
	    
	    <?php endif;?>
	</channel>
</rss>